package javaTeste.tWhile;

import java.Condicao;
import java.bloco.While;

import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;


public class TesteBlocoWhile implements Especificacao {
	While whileAgua = null;
	@Before
	public void up() {
		whileAgua = new While(new Condicao("agua==limpa"));
	}
	@Test
	public void seCondicaoAguaLimpaComandoA() {
		whileAgua.setLogica("a");
		Assert.assertEquals("while(agua==limpa){a}", whileAgua
				.codigoFonte());
	}

	@Test
	public void whileCondicaoAguaLimpa() {
		Assert.assertEquals("while(agua==limpa){}", whileAgua.codigoFonte());
	}

}